<!DOCTYPE html>
<html xmlns:th="http://www.w3.org/1999/xhtml" xmlns:shiro="http://www.w3.org/1999/xhtml">
<head>
    <head th:include="header :: header"></head>
    <title></title>
</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">

            <a shiro:hasPermission="sys:user:save" class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>

            <a shiro.hasPermission="sys:user:update" class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>

            <a shiro.hasPermission="sys:user:delete" class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal">
														                    <div class="form-group">
                        <div class="col-sm-2 control-label">空间名称</div>
                        <div class="col-sm-10">
                            <input maxlength="30" type="text" class="form-control" v-model="space.name" placeholder="空间名称"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">所属机构</div>
                        <div class="col-sm-10">
							<input type="text" class="form-control" style="cursor:pointer;" v-model="space.deptName" @click="deptTree" readonly="readonly" placeholder="所属机构"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">责任人</div>
                        <div class="col-sm-10">
                            <input maxlength="20" type="text" class="form-control" v-model="space.director" placeholder="责任人"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">联系方式</div>
                        <div class="col-sm-10">
                            <input maxlength="100" type="text" class="form-control" v-model="space.contact" placeholder="联系方式"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-2 control-label">创建时间</div>
                        <div class="col-sm-10">
                            <input maxlength="" type="text" readonly="readonly" class="form-control" v-model="space.createTime" placeholder="创建时间"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-2 control-label">修改时间</div>
                        <div class="col-sm-10">
                            <input maxlength="" type="text" readonly="readonly" class="form-control" v-model="space.updateTime" placeholder="修改时间"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">创建人</div>
                        <div class="col-sm-10">
                            <input maxlength="" type="text" readonly="readonly" class="form-control" v-model="space.createUser" placeholder="创建人"/>
                        </div>
                    </div>
											                    <div class="form-group">
                        <div class="col-sm-2 control-label">修改人</div>
                        <div class="col-sm-10">
                            <input maxlength="" type="text" readonly="readonly" class="form-control" v-model="space.updateUser" placeholder="修改人"/>
                        </div>
                    </div>
							            <div class="form-group">
                <div class="col-sm-2 control-label"></div>
                <input type="button" class="btn btn-primary" id="btnSaveOrUpdate" data-loading-text="保存中..." @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>

<!-- 选择部门 -->
<div id="deptLayer" style="display: none;padding:10px;">
	<ul id="deptTree" class="ztree"></ul>
</div>

<script th:src="@{/statics/js/modules/workspace/space.js}"></script>
</body>
</html>